import { defineStore } from 'pinia'
import {reactive} from 'vue'

export const useUserStore = defineStore('user', () => {
  const userInfo = reactive({
    name:'用户名',
    id:1
  })
  function setUserInfo(user) {
    userInfo.name = user.name
    userInfo.id = user.id
  }

  return { userInfo, setUserInfo }
})